package com.mymvc.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

/**
 * ClassName: HelloController02
 * Package: com.mymvc.controller
 * Description:
 *
 * @Author 刘英杰
 * @Create 2025/2/8 15:33
 * @Version 1.0
 */

@Controller
@RequestMapping("/helloController02")
public class HelloController02 {

    @GetMapping("/hello02.do")
    public ModelAndView hello() {
        ModelAndView modelAndView = new ModelAndView();
        modelAndView.setViewName("index");
        modelAndView.addObject("name", "xxx");
        return modelAndView;
    }
}
